#include "app_device.h"
#include "unistd.h"
#include "app_pool.h"
#include "app_mqtt.h"
#include "app_bt.h"
#include "app_serial.h"


int main(int argc, char const *argv[])
{
	//0 初始化线程池 和 消息队列模块
	app_pool_init(5);
	app_mqtt_init();

	//1 初始化设备
	device_t *device =app_device_init("/home/atguigu/workspace/gateway/test_dev_file");
	//1.5 对设备结构体进行蓝牙设置
	app_serial_init(device);
	app_bt_init(device );

	//2 启动设备
	app_device_start();
	//3  延迟1000
	sleep(1000);
	//3 销毁设备
	app_device_destroy();

	return 0;
}
